﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RastinArgham.CRM.Business
{
    public partial class DefaultAccountManager
    {
        private CRMEntities repo = new CRMEntities();

        public string Username
        {
            get
            {
                User user = repo.Users.Where(u => u.UserId == this.UserId).FirstOrDefault();
                if (user == null)
                    return String.Empty;
                else
                    return user.UserName;
            }
        }

        public string Cityname
        {
            get
            {
                City city = repo.Cities.Where(c => c.CityId == this.CityId).FirstOrDefault();
                return city.CityName;
            }
        }

    }
}
